package com.lds.employment.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lds.employment.mapper.EmploymentAssistanceMapper;
import com.lds.employment.domain.EmploymentAssistance;
import com.lds.employment.service.IEmploymentAssistanceService;

/**
 * 就业帮扶预约Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-05
 */
@Service
public class EmploymentAssistanceServiceImpl implements IEmploymentAssistanceService 
{
    @Autowired
    private EmploymentAssistanceMapper employmentAssistanceMapper;

    /**
     * 查询就业帮扶预约
     * 
     * @param id 就业帮扶预约主键
     * @return 就业帮扶预约
     */
    @Override
    public EmploymentAssistance selectEmploymentAssistanceById(Long id)
    {
        return employmentAssistanceMapper.selectEmploymentAssistanceById(id);
    }

    /**
     * 查询就业帮扶预约列表
     * 
     * @param employmentAssistance 就业帮扶预约
     * @return 就业帮扶预约
     */
    @Override
    public List<EmploymentAssistance> selectEmploymentAssistanceList(EmploymentAssistance employmentAssistance)
    {
        return employmentAssistanceMapper.selectEmploymentAssistanceList(employmentAssistance);
    }

    /**
     * 新增就业帮扶预约
     * 
     * @param employmentAssistance 就业帮扶预约
     * @return 结果
     */
    @Override
    public int insertEmploymentAssistance(EmploymentAssistance employmentAssistance)
    {
        employmentAssistance.setCreateTime(new Date());
        return employmentAssistanceMapper.insertEmploymentAssistance(employmentAssistance);
    }

    /**
     * 修改就业帮扶预约
     * 
     * @param employmentAssistance 就业帮扶预约
     * @return 结果
     */
    @Override
    public int updateEmploymentAssistance(EmploymentAssistance employmentAssistance)
    {
        return employmentAssistanceMapper.updateEmploymentAssistance(employmentAssistance);
    }

    /**
     * 批量删除就业帮扶预约
     * 
     * @param ids 需要删除的就业帮扶预约主键
     * @return 结果
     */
    @Override
    public int deleteEmploymentAssistanceByIds(Long[] ids)
    {
        return employmentAssistanceMapper.deleteEmploymentAssistanceByIds(ids);
    }

    /**
     * 删除就业帮扶预约信息
     * 
     * @param id 就业帮扶预约主键
     * @return 结果
     */
    @Override
    public int deleteEmploymentAssistanceById(Long id)
    {
        return employmentAssistanceMapper.deleteEmploymentAssistanceById(id);
    }

    @Override
    public List<EmploymentAssistance> all() {
        return employmentAssistanceMapper.all();
    }
}
